<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport"	content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0" />
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="format-detection" content="telephone=no">
		<title>${initParam.WxAppName}</title>
		<link href="${pageContext.request.contextPath}/bettery/css/itao.css"	rel="stylesheet" />
		<script type="text/javascript" src="${pageContext.request.contextPath}/dewei/js/jquery.js?v=1"></script>
		<script type="text/javascript"	src="${pageContext.request.contextPath}/bettery/js/jquery.bxslider.min.js"></script>
		<script	src="${pageContext.request.contextPath}/bettery/js/jquery-ui-1.10.4.custom.min.js"></script>
		<script type="text/javascript"	src="${pageContext.request.contextPath}/bettery/js/bettery_common.js?v=22"></script>
		
		<script type="text/javascript">
		$(function(){
			getaddressByLatLngGaode();
		});
		
		scrollLoad();
		function checkBettery(id,pinPai,xingHao,ourPrice,imageUrl,zhongliang,licheng,detailInfo,marketPrice){
			if(id){
			    $('#dianchiId').val(id);//选中 电池id
				$("#pinPai").val(pinPai);
				$("#xingHao").val(xingHao);
				$("#ourPrice").val(ourPrice);
				$("#imageUrl").val(imageUrl);
				$("#bettery_marketPrice").val(marketPrice);
				$("#bettery_zhongliang").val(zhongliang);
				$("#bettery_licheng").val(licheng);
				$("#bettery_detailInfo").val(detailInfo);
				
				$("#tsss").val(new Date());
				$('#searchForm').submit();
			}
		}
		</script>
	</head>
	<body onload="hideLoading()">
		<form id='searchForm' action="changeTypeManul.do" method="post">
		
		
		
		<s:hidden  name='model.lat' id="hiddenLat"/><s:hidden name='model.lng' id="hiddenLng"/>
		<s:hidden  name='model.blat' id="hiddenbLat"/><s:hidden name='model.blng' id="hiddenbLng"/>
		<s:hidden  name='model.mlat' id="hiddenmLat"/><s:hidden name='model.mlng' id="hiddenmLng"/>
		<s:hidden id="chexingId" name="model.chexingId"/>
		<s:hidden name="model.chexingName"   id="hiddenChexingName"/>
		<!-- 下订单人所在的省市县 -->
	    <s:hidden name='model.province' cssClass="hiddenProvince"  id="hiddenProvince"/>
	    <s:hidden name='model.city' cssClass="hiddenCity" id="hiddenCity"/>
	    <s:hidden name='model.town' cssClass="hiddenTown" id="hiddenTown"/>
	    <s:hidden id="shangmenAddress" name="model.address"  cssClass="form-control address"/>
	    <!-- 电池 -->
		<s:hidden name="model.dianchiId" id="dianchiId"/>
		<s:hidden name='model.price' id="ourPrice"/><s:hidden name='model.pinPai' id="pinPai"/>
		<s:hidden name='model.xingHao' id="xingHao"/><s:hidden name='model.imageUrl' id="imageUrl"/>
		
		<s:hidden name='model.zhongliang' id="bettery_zhongliang"/><s:hidden name='model.licheng' id="bettery_licheng"/>
		<s:hidden name='model.detailInfo' id="bettery_detailInfo"/><s:hidden name='model.marketPrice' id="bettery_marketPrice"/>
		
					<!-- 门店地址 -->
			<s:hidden name='model.mendianAddr' id="hiddenmendianAddr"/>
			<s:hidden name='model.mendianId' id="hiddenMendianId"/>
			<!-- 门店联系电话 -->
			<s:hidden name='model.menDianTel' id="hiddenMenDianTel"/>
			<s:hidden name='model.mendianLxr' id="hiddenMendianLxr"/>
			<s:hidden name='model.mendianName' id="hiddenMendianName"/>
		
		 <input type="hidden" id="tsss">
		<div class="search_bar" style="" align="center">
		<span class='new-btn left'>
		<a    onclick="back();">返回</a>
		</span>
		<span class="city-span right">[ ${model.city} ]</span>
		</div>
		<div align="center">
			<div class="tips">以下电池适合您的电动车，请选择</div>
		</div>
		<div class="col-lg-12 m-t-mini"  >	
		<div class='search-list' >	
					<s:if test='null!=betteryList&&betteryList.size()>0'>
						<ul>
							<s:iterator value="betteryList">
								<li class='panel' style='background:none' onclick="checkBettery(${id}, '${pinPai}','${xingHao}', '${ourPrice}', '${imageUrl}','${zhongliang}','${licheng}','${detailInfo}','${marketPrice}');">
									<div class="list-item">
										<div class="p" >
												<s:if test='null==imageUrl||""==imageUrl'>
													
													<img src="${pageContext.request.contextPath}/bettery/img/logo2.jpg"	class="p-pic">
													
												</s:if>
												<s:else>
													
													<img src="${imageUrl}"   class="p-pic">
													
												</s:else>
										</div>
										<div class="d">
										    <div class='title'>${pinPai}${xingHao}</div>
										    <div class='price'>
												<img src='${pageContext.request.contextPath}/bettery/icons/price-type.png' style='height:32px;position:absolute;left:5px;top:5px'/>
												<div >
													<a style="font-size: 12px;text-decoration:line-through;">${marketPrice}元</a>
												</div>
												<div>
												
													<a style="color:red; font-size: 14px;">${ourPrice}元</a>
												</div>
										    </div>
											<img src='${pageContext.request.contextPath}/bettery/icons/bottom_1.png' style='margin:0;padding:0;display:block' width='100%'/>
										</div>
										
									</div>
								</li>
							</s:iterator>
						</ul>
					</s:if>
					<s:else>
						<div class='col-lg-12 m-t m-b search-list'
							style="min-height: 200px">
							<div class='m-t m-b' style="text-align:center;padding-top:35px;">
								呃，适应您的车型的电池不存在！
							</div>
						</div>
					</s:else>
				</div>
		</div>
		</form>
	</body>
</html>
